package com.qiumo.gmtool.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qiumo.gmtool.common.RetResult;
import com.qiumo.gmtool.entity.FastBtnEntity;
import com.qiumo.gmtool.service.FastBtnService;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 快捷功能
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/fast")
public class FastBtnController {

    private final FastBtnService fastBtnService;

    @GetMapping("/list")
    public RetResult list() {
        List<FastBtnEntity> list = fastBtnService.list(new LambdaQueryWrapper<FastBtnEntity>()
            .eq(FastBtnEntity::getStatus, "0"));
        return RetResult.succ(list);
    }

}
